package org.iks.user.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.JdbcType;
import org.iks.user.enums.ApplyFriendStatus;
import org.iks.user.enums.ApplySourceType;
import org.iks.user.enums.handlers.ApplyFriendStatusTypeHandler;
import org.iks.user.enums.handlers.ApplySourceTypeTypeHandler;

import java.util.Date;

/**
 * Author kzou
 * Date 2024/2/13
 * Description:
 */
@Setter
@Getter
@TableName(value = "user_friend", autoResultMap = true)
public class FriendEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String userAccount;

    private String creatorAccount;

    private Date createTime;

    @TableField(typeHandler = ApplyFriendStatusTypeHandler.class, jdbcType = JdbcType.INTEGER)
    private ApplyFriendStatus status;

    private String friendNote;

    private String applyNote;

    @TableField(typeHandler = ApplySourceTypeTypeHandler.class, jdbcType = JdbcType.INTEGER)
    private ApplySourceType applySourceType;

}
